1. Field of the Invention
The present invention relates generally to a compiler and, more particularly, to a compiler for a data parallel computer.
2. Related Art
A data parallel computer has an array of many parallel processors, each with some associated memory and all acting under the direction of a serial computer called a host. Note that the host and data parallel computer could reside in a single machine. The parallel data computer supports parallel values having multiple data points called positions. The value of a position is called an element. Each parallel processor stores the element of one such position in its local memory.
On some parallel data computers, each parallel value is described by a template called a "shape". A shape is specified by how many dimensions it has and by the number of positions in each of its dimensions. The total number of positions in a shape is the product of the number of positions in each of its dimensions. For example, an 8.times.4 shape has 32 positions.
All of the parallel processors (or a subset of the parallel processors) can perform a single operation on all of the positions of a parallel value simultaneously. Such an operation is called a parallel operation.
A compiler is a computer program which receives a source program as input. The source program (also called source code) is written in a source language. The compiler translates the source program into an equivalent target program (also called target code). The target program is written in a target language.
Many source and target languages are known. For example, source languages include Basic, Pascal, Fortran, C, and Lisp. Target languages include machine languages as well as other source languages.
Once the target code has been generated by the compiler, it must be processed by a loader/link editor. Among other things, the loader/link editor links scalar variable references to the appropriate declarations, initializes scalar variables and allocates memory for scalar variables. (A scalar variable is a variable which is not a parallel value.)
However, the loader/link editor operates at compile time. (More specifically, if operates after compile-time but before run time.) Generally, communication with the data parallel computer is limited to run time. As a result, the loader/link editor cannot link references and declarations for parallel variables or shapes, allocate memory for parallel values or shapes, or initialize pointers to parallel variables. (A parallel variable is a named identifier of a parallel value.)
Therefore, what is needed is a system and method for processing variables involving parallelism, i.e., parallel variables, shapes and pointers to parallel variables, at run time. (Variables involving parallelism are also referred to as run-time variables.)